﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using sdm.exam.domain.DataContext;
using sdm.exam.domain.Entities;

namespace sdm.exam.domain.Manager
{
    public class SemesterClassManager
    {
        readonly SemesterClassDomain _manager = new SemesterClassDomain();
        /// <summary>
        /// Gets a list of all semester classes.
        /// </summary>
        /// <returns>The list of semester classes.</returns>
        public List<Entities.SemesterClass> GetListOfSemesterClasses()
        {
            return _manager.GetListOfSemesterClasses();
        }

        /// <summary>
        /// Add new semester class.
        /// </summary>
        /// <param name="name">Name of the semester class.</param>
        /// <param name="startDate">The date where the semester class starts the education.</param>
        /// <param name="endDate">The date where the semester class ends the education.</param>
        /// <param name="education">The education for the semester class.</param>
        public void AddNewSemesterClass(string name, DateTime startDate, DateTime endDate, Education education)
        {
            _manager.AddNewSemesterClass(name, startDate, endDate,education);
        }

        /// <summary>
        /// Edit a semester class.
        /// </summary>
        /// <param name="id">The id of the semesterclass to edit.</param>
        /// <param name="newName">New name to the semester class.</param>
        /// <param name="newStartDate">New start date.</param>
        /// <param name="newEndDate">New end date.</param>
        /// <param name="newEducation">New education.</param>
        public void EddSemesterClass(int id, string newName, DateTime newStartDate, DateTime newEndDate, Education newEducation)
        {
            _manager.EddSemesterClass(id, newName, newStartDate, newEndDate, newEducation);
        }

        /// <summary>
        /// Deletes a semester class
        /// </summary>
        /// <param name="id">The semester class's id.</param>
        public void DeleteSemesterClass(int id)
        {
            _manager.DeleteSemesterClass(id);
        }
    }
}
